package com.wei.czz.common.vo.game;

import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.ObjectUtils;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2023-03-22 16:59:28
 * className: DefaultPrizeVo 游戏默认奖品参数类
 * version: 1.0
 * description:
 */
@Getter
@Setter
public class DefaultPrizeVo extends BaseEntity {

    /**
     * 游戏主键
     */
    private Long gameId;
    /**
     * 游戏奖品主键
     */
    private Long prizeId;
    /**
     * 原默认奖品主键
     */
    private Long oldPrizeId;

    /**
     * 校验保存请求参数是否有误
     * @return true-校验拒绝 false-校验通过
     */
    public boolean isSaveParamFail() {
        return ObjectUtils.anyNull(gameId, prizeId, oldPrizeId);
    }

    /**
     * 校验删除请求参数是否有误
     * @return true-校验拒绝 false-校验通过
     */
    public boolean isDeleteParamFail() {
        return ObjectUtils.anyNull(gameId, oldPrizeId);
    }
}
